Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Accordion component and patterns #662

Merged
merged 33 commits into from
Oct 4, 2024
Merged

Conversation

jwmunn
Copy link
Contributor

@jwmunn jwmunn commented Aug 22, 2024

Task: task-988155

Links: Accordion component | Accordion patterns

Component
http://localhost:1111/components/accordion.html

Fluent 2 - React Accordion - Fluent 2 Design System (microsoft.design)
Figma - Fluent 2 web – Figma
Accessibility - Accordion Pattern (Sections With Show/Hide Functionality) | APG | WAI | W3C

Handles:

  • 3 sizes (matches fluent)
  • Multiple open panels or only 1 open panel, designated open panel on page load
  • Left and right aligned icon (matches fluent arrow direction)
    * Automatically adds left/right padding if background color atomic classes are used
  • Uses same animation for chevron direction change + timing as current _details.scss icon (transition: transform 0.15s)

Pattern
http://localhost:1111/patterns/accordion.html
Serves 2 functions

  1. Use atomics to show pattern that will be used for upcoming Ignite designs.
  2. This component will deprecate the need for _details.scss currently used in docs-ui, 2 patterns used to show the 2 scenarios currently being used on docs-ui.

Form-based advisor/Plan adjuster pattern for Ignite
Figmas (press Shift + 2 after page load to zoom in on component selection):

_details.scss usage in docs-ui

3rd pattern example would replace:

Testing

  1. Visit preview pages to view new pages
    Expected result: Component page matches Figma. Patterns match docs-ui .details usage (FAQ, Career Path Journey section), and Form-based advisor/Plan adjuster designs proposed for Ignite
  2. Visit Select component page
    Expected result: Verify refactor to use shared chevron mixin results in no visual changes from existing page

Additional information

[Optional]

Contributor checklist

  • Did you update the description of this pull request with a review link and test steps?
  • Did you submit a changeset? Changesets are required for all code changes.
  • Does your pull request implement complex UI logic (js/ts)? Consider adding an integration test to test your user flow.
  • Does your pull request add a new page to the documentation site? Add your new page for automated accessibility testing in /integration/tests/accessibility.

@jwmunn jwmunn requested a review from a team as a code owner August 22, 2024 16:57
Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: ba7a8db

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@microsoft/atlas-integration Minor
@microsoft/atlas-css Minor
@microsoft/atlas-site Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
css/src/components/accordion.scss Outdated Show resolved Hide resolved
css/src/components/accordion.scss Outdated Show resolved Hide resolved
css/src/components/accordion.scss Outdated Show resolved Hide resolved
css/src/components/accordion.scss Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved

### Open

There is an option to have the accordion component load in the expanded state by adding the `open` attribute to one of the items.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, slight rewording, please feel free to disregard:

Suggested change
There is an option to have the accordion component load in the expanded state by adding the `open` attribute to one of the items.
To load the accordion component in the expanded state by default, add the `open` attribute to the appropriate `<details>` element.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅Updated since I was already updating other copy.

@jwmunn jwmunn force-pushed the jumunn/accordion-component branch from 7f0931a to 2801fea Compare August 26, 2024 19:23
@jwmunn
Copy link
Contributor Author

jwmunn commented Aug 26, 2024

@ollips @BenDMyers @homing1 all feedback has been addressed. Ready for review.

@jwmunn jwmunn requested review from BenDMyers, ollips and homing1 August 26, 2024 19:35
css/src/components/accordion.scss Outdated Show resolved Hide resolved
css/src/components/accordion.scss Outdated Show resolved Hide resolved
css/src/components/accordion.scss Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
@jwmunn jwmunn force-pushed the jumunn/accordion-component branch from da32ace to 0dd1fc2 Compare August 30, 2024 23:52
@jwmunn jwmunn force-pushed the jumunn/accordion-component branch from 5dad42b to 9d3d573 Compare September 4, 2024 23:37
Copy link
Contributor Author

@jwmunn jwmunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Still need to come up with the pattern descriptions

site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
css/src/components/accordion.scss Outdated Show resolved Hide resolved
Copy link
Contributor Author

@jwmunn jwmunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@homing1 @BenDMyers @ollips feedback has been addressed, ready for review.

site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/components/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
@jwmunn jwmunn requested review from ollips and homing1 September 5, 2024 18:18
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
site/src/patterns/accordion.md Outdated Show resolved Hide resolved
jwmunn and others added 2 commits September 5, 2024 14:56
Co-authored-by: Ming Ho <94572161+homing1@users.noreply.github.com>
@ollips ollips requested a review from homing1 October 4, 2024 20:17
@homing1 homing1 merged commit bd2f360 into main Oct 4, 2024
6 checks passed
@jwmunn jwmunn deleted the jumunn/accordion-component branch October 7, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants